package com.bhs.sansong.adapter;

import androidx.annotation.NonNull;

import com.bhs.sansong.R;
import com.bhs.sansong.bean.LogisticsTrackBean;
import com.bhs.sansong.utils.DateUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

/**
 * 物流轨迹Adapter
 */
public class LogisticsTrackAdapter extends BaseQuickAdapter<LogisticsTrackBean, BaseViewHolder> {
    public LogisticsTrackAdapter() {
        super(R.layout.item_logistics_track);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, LogisticsTrackBean item) {
        helper.setGone(R.id.view3, helper.getLayoutPosition() != getData().size() - 1);
        helper.setText(R.id.tv_status, item.getStatus_msg());
        helper.setText(R.id.tv_time, DateUtils.stampToDate(item.getCreate_time()));
        helper.setText(R.id.tv_operator, item.getRemark());

    }
}
